<?php
class Data_Model extends CI_Model{
	// public function a($worker){
	// 	$data = $this->b($worker);
	// 	$data['book'] = $_SESSION['book'];
	// 	$this->load->view('test/test',$data);
	// 	header("Content-type:application/vnd.ms-excel"); 
	// 	header("Content-Disposition:filename=test.xls"); 
	// }


	// public function b($worker){
	// 	$data['info'] = $this->db
	// 		->where('id',$worker)
	// 		->get('worker')
	// 		->row();
	// 	$data['work'] = $this->db
	// 		->select('book.name,attendance.date,attendance.attendance_days,attendance.attendance_salary')
	// 		->join('book','book.id = attendance.book_id')
	// 		->where('worker_id',$worker)
	// 		->order_by('date','DESC')
	// 		->get('attendance')
	// 		->result();
	// 	$data['payment'] = $this->db
	// 		->where('worker_id',$worker)
	// 		->order_by('date')
	// 		->get('payment')
	// 		->result();
	// 	$data['payment_all'] = $this->db
	// 		->select('sum(amount) as amount')
	// 		->where('worker_id',$worker)
	// 		->get('payment')
	// 		->row();
	// 	$data['attendance_salary'] = $this->db
	// 		->select('sum(attendance_salary) as attendance_salary')
	// 		->where('worker_id',$worker)
	// 		->get('attendance')
	// 		->row();

	// 	return $data;
		
	}
}